package io;

import java.io.FileWriter;
import java.io.PrintWriter;

/**
 * 字符打印流-PrintWriter
 */
public class PrintWriter_ {

    public static void main(String[] args) throws Exception {

        PrintWriter printWriter = new PrintWriter(new FileWriter("D:\\IdeaCode\\javaStudy\\f2.txt"));
        printWriter.println("你好你好你好");
        //需要关闭流才能输出
        printWriter.close();    //flush + 关闭流
    }
}
